package sjd.ahsj.springbootmybatisplusoracle.service.impl;

import com.baomidou.mybatisplus.mapper.Wrapper;
import org.springframework.beans.factory.annotation.Autowired;
import sjd.ahsj.springbootmybatisplusoracle.entity.AnimeSubscription;
import sjd.ahsj.springbootmybatisplusoracle.mapper.AnimeMapper;
import sjd.ahsj.springbootmybatisplusoracle.mapper.AnimeSubscriptionMapper;
import sjd.ahsj.springbootmybatisplusoracle.service.IAnimeSubscriptionService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 订阅 服务实现类
 * </p>
 *
 * @author zhanghaogao
 * @since 2018-09-19
 */
@Service
public class AnimeSubscriptionServiceImpl extends ServiceImpl<AnimeSubscriptionMapper, AnimeSubscription> implements IAnimeSubscriptionService {

    @Autowired
    private AnimeMapper animeMapper;

    @Override
    public boolean insert(AnimeSubscription entity) {
        animeMapper.addSubscription(entity.getAnimeId());
        return super.insert(entity);
    }



}
